home *** CD-ROM | disk | FTP | other *** search
/ MacFormat España 27 / MacFormat n. 27 (Spain) / Mac Format 26.bin / Shareware / Comunicaciones / mtx2html 1.5.5 / guide / guide.mtx < prev    next >
Encoding:
Text File  |  1997-01-01  |  10.0 KB  |  283 lines

  1. %TITLE A Five Minute Guide to HTML and MTX
  2. %FILE index
  3. %IMAGES images/
  4. %AUTHOR Richard Rathe / rrathe@dean.med.ufl.edu
  5. %AUTHURL rrathe@dean.med.ufl.edu
  6. %VERSION MTX 1.5 / Guide 3.0
  7. %PATH http://www.med.ufl.edu/medinfo/mtx/guide/
  8. %MTX 1.5
  9.  
  10. #Introduction
  11.  
  12. ##What is HTML?
  13.  
  14. HTML stands for "Hypertext Markup Language." HTML is the page layout standard used by the World Wide Web. The current version of HTML is 2.0 but extensions such as tables and floating graphics are also in use. You must use a web browser such as Netscape Navigator, NCSA Mosaic, or Lynx to view HTML files.
  15.  
  16. ##What is MTX?
  17.  
  18. MTX is short for "Simple Marked Text." It is a simplified means for creating HTML documents. The MTX format is easy to learn and use. You can create MTX formatted files with any word processor or text editor. The MTX Tool converts these files into HTML pages in a matter of seconds.
  19.  
  20. ##How to use this guide?
  21.  
  22. This guide presents the basics of both HTML and MTX in a step-by-step tutorial format. The following sections introduce basic HTML concepts followed by the equivalent MTX syntax. You may wish to copy and paste the examples into your own files and experiment with the concepts being presented. By the end of this exercise you should be able to create your own Web pages using either plain HTML or MTX.
  23.  
  24. #To Begin...
  25.  
  26. ##HTML
  27.  
  28. HTML files are nothing other than plain text files containing a series of page formatting tags. Tags consist of a less than sign (<), the tag name, and a greater than sign (>). "<TITLE>" is an example of a tag. Most tags have a complementary closing tag with an added slash character (/). "</TITLE>" is an example of a closing tag. Pairs of tags are used to enclose page elements such as the title of the page. HTML files have two major parts, the head and body, identified by the "<HEAD>" and <BODY> tags respecitively. The head contains the title and other information about the page. A properly formed HTML file also begins with the "<HTML>" tag and ends with "</HTML>". Here is an example:
  29.  
  30. =    <HTML>
  31. =    <HEAD>
  32. =    <TITLE>Basic HTML Page</TITLE>
  33. =    </HEAD>
  34. =    <BODY>
  35. =
  36. =      Empty for now...
  37. =
  38. =    </BODY>
  39. =    </HTML>
  40.  
  41. -----
  42. ##MTX
  43.  
  44. MTX takes care of all of these details for you. One line of MTX is all you need to create the basic HTML file shown above:
  45.  
  46. =    %TITLE Basic HTML Page
  47. =
  48. =      Empty for now...
  49. =
  50.  
  51. #Adding Some Content
  52.  
  53. ##HTML
  54.  
  55. Now let's add some text to the body of the HTML document.
  56.  
  57. =    <HTML>
  58. =    <HEAD>
  59. =    <TITLE>Basic HTML Page</TITLE>
  60. =    </HEAD>
  61. =    <BODY>
  62. =    This is a short paragraph to demonstrate how HTML handles text.
  63. =    The most important thing to note is that extra space        ,
  64. =    tab, and return characters are ignored by HTML.
  65. =
  66. =    The blank line above will become a single space when displayed.
  67. =    </BODY>
  68. =    </HTML>
  69.  
  70. -----
  71. ##MTX
  72.  
  73. Here's the next difference between HTML and MTX, in MTX blank lines are used to delimit paragraphs. Extra spaces and tabs are ignored just as with HTML.
  74.  
  75. =    %TITLE Basic HTML Page
  76. =
  77. =    This is a short paragraph to demonstrate how MTX handles text.
  78. =    Blank lines are used to delimit paragraphs.
  79. =
  80. =    The blank line above will force a paragraph break before this line.
  81.  
  82. #Paragraphs
  83.  
  84. ##HTML
  85.  
  86. HTML treats all text as one continuous paragraph until it comes to a paragraph "<P>" tag. By adding a "<P>" we divide the body of this page into two paragraphs.
  87.  
  88. =    <HTML>
  89. =    <HEAD>
  90. =    <TITLE>Basic HTML Page</TITLE>
  91. =    </HEAD>
  92. =    <BODY>
  93. =    This is a short paragraph to demonstrate how HTML handles text.
  94. =    The most important thing to note is that extra space        ,
  95. =    tab, and return characters are ignored by HTML.<P>
  96. =
  97. =    The blank line above will become a single space when displayed.
  98. =    </BODY>
  99. =    </HTML>
  100.  
  101. -----
  102. ##MTX
  103.  
  104. Our paragraphs are already defined...
  105.  
  106. =    %TITLE Basic HTML Page
  107. =
  108. =    This is a short paragraph to demonstrate how MTX handles text.
  109. =    Blank lines are used to delimit paragraphs.
  110. =
  111. =    The blank line above will force a paragraph break before this line.
  112.  
  113. #Headings and Sections
  114.  
  115. ##HTML
  116.  
  117. Heading tags can be used to give structure to a page. Headings come in different "sizes" from 1 to 6. It is good practice to use the the top level heading "<H1>" to repeat the page title at the beginning of the body. Major sections should use "<H2>" headings, subsections "<H3>" headings, and so on.
  118.  
  119. =    <HTML>
  120. =    <HEAD>
  121. =    <TITLE>Basic HTML Page</TITLE>
  122. =    </HEAD>
  123. =    <BODY>
  124. =    <H1>Basic HTML Page</H1>
  125. =    This is a short paragraph to demonstrate how HTML handles text.
  126. =    The most important thing to note is that extra space        ,
  127. =    tab, and return characters are ignored by HTML.<P>
  128. =
  129. =    The blank line above will become a single space when displayed.
  130. =
  131. =    <H2>Second Section</H2>
  132. =
  133. =      Empty for now...
  134. =
  135. =    <H2>Third Section</H2>
  136. =
  137. =      Empty for now...
  138. =
  139. =    </BODY>
  140. =    </HTML>
  141.  
  142. -----
  143. ##MTX
  144.  
  145. MTX automatically supplies the top level heading for the page from the "%TITLE" tag. Section headings are defined by adding a pound sign (#) to the heading text. As an added benefit, MTX will automatically create a table of contents for the page based on the section headings.
  146.  
  147. =    %TITLE Basic HTML Page
  148. =
  149. =    This is a short paragraph to demonstrate how MTX handles text.
  150. =    Blank lines are used to delimit paragraphs.
  151. =
  152. =    The blank line above will force a paragraph break before this line.
  153. =
  154. =    #Second Section
  155. =
  156. =      Empty for now...
  157. =
  158. =    #Third Section
  159. =
  160. =      Empty for now...
  161. =
  162.  
  163. #Adding Pictures
  164.  
  165. ##HTML
  166.  
  167. HTML documents can include pictures stored as separate files. These pictures are inserted in the text by the image "<IMG>" tag. This tag is unusual in that there is {*no*} closing "</IMG>" tag. The name of the picture file is included as part of the tag itself, in this case "picture.gif".
  168.  
  169. =    <HTML>
  170. =    <HEAD>
  171. =    <TITLE>Basic HTML Page</TITLE>
  172. =    </HEAD>
  173. =    <BODY>
  174. =    <H1>Basic HTML Page</H1>
  175. =    This is a short paragraph to demonstrate how HTML handles text.
  176. =    The most important thing to note is that extra space        ,
  177. =    tab, and return characters are ignored by HTML.<P>
  178. =
  179. =    The blank line above will become a single space when displayed.
  180. =
  181. =    <H2>Second Section</H2>
  182. =
  183. =    <IMG SRC="picture.gif">
  184. =
  185. =    <H2>Third Section</H2>
  186. =
  187. =      Empty for now...
  188. =
  189. =    </BODY>
  190. =    </HTML>
  191.  
  192. -----
  193. ##MTX
  194.  
  195. The MTX approach to pictures is a bit simpler. The "≤=" and "=≥" tags are used to surround the name of the picture. Since the picture file is already known to be a GIF, the ".gif" extension is omitted.
  196.  
  197. =    %TITLE Basic HTML Page
  198. =
  199. =    This is a short paragraph to demonstrate how MTX handles text.
  200. =    Blank lines are used to delimit paragraphs.
  201. =
  202. =    The blank line above will force a paragraph break before this line.
  203. =
  204. =    #Second Section
  205. =
  206. =    ≤=picture=≥
  207. =
  208. =    #Third Section
  209. =
  210. =      Empty for now...
  211. =
  212.  
  213. #Hypertext Links
  214.  
  215. ##HTML
  216.  
  217. Now we are ready to add hypertext links to our file. The "<A>" anchor tags are used to enclose text (or images) to make "hot spots" in the document. Hot spots are indicated by color or other highlighting. Additional information about the link must appear just after the opening "<A>" tag. This usually takes the form of "HREF=URL" where URL is an address (in quotes) for the hypertext jump. The first example shows a hypertext link to a local file "example1.html" in the {*same*} directory as this one. The second example shows the use of a complete URL for both the hot text and link address.
  218.  
  219. =    <HTML>
  220. =    <HEAD>
  221. =    <TITLE>Basic HTML Page</TITLE>
  222. =    </HEAD>
  223. =    <BODY>
  224. =    <H1>Basic HTML Page</H1>
  225. =    This is a short paragraph to demonstrate how HTML handles text.
  226. =    The most important thing to note is that extra space        ,
  227. =    tab, and return characters are ignored by HTML.<P>
  228. =
  229. =    The blank line above will become a single space when displayed.
  230. =
  231. =    <H2>Second Section</H2>
  232. =
  233. =    <IMG SRC="picture.gif">
  234. =
  235. =    <H2>Third Section</H2>
  236. =
  237. =    This is a <A HREF="example1.html">link</A> to an example file.<P>
  238. =
  239. =    The MTX home page is located at: <A HREF="http://www.med.ufl.edu/medinfo/mtx/">http://www.med.ufl.edu/medinfo/mtx/</A>
  240. =
  241. =    </BODY>
  242. =    </HTML>
  243.  
  244. -----
  245. ##MTX
  246.  
  247. MTX fixes several flaws with HTML "anchors." First, the syntax is simpler and easier to read--hypertext links are delimited by "≤#" and "#≥" tags. Second, the destination address comes after the link text. This is a more natural way to think about hypertext and adds to readability. Finally, redundant information is removed when using URLs or email addresses as links. Notice the brevity of the second hypertext example shown below. The "##" tells MTX to repeat the link text as the destination address.
  248.  
  249. =    %TITLE Basic HTML Page
  250. =
  251. =    This is a short paragraph to demonstrate how MTX handles text.
  252. =    Blank lines are used to delimit paragraphs.
  253. =
  254. =    The blank line above will force a paragraph break before this line.
  255. =
  256. =    #Second Section
  257. =
  258. =    ≤=picture=≥
  259. =
  260. =    #Third Section
  261. =
  262. =    This is a ≤#link#example1.html#≥ to an example file.
  263. =
  264. =    The MTX home page is located at: ≤#http://www.med.ufl.edu/medinfo/mtx/##≥
  265. =
  266.  
  267. #Conclusion
  268.  
  269. During this exercise we have created two parallel example files--one using {#plain HTML#example1.html#} and the other using {#MTX#example2.mtx#} to generate {#HTML#example2.html#}. Notice that the MTX example contains an interactive table of contents. Creating a table of contents in plain HTML is left as an exercise for the reader.
  270.  
  271. ##Further Reading
  272.  
  273.     {#A Beginner's Guide to HTML#http://www.ncsa.uiuc.edu/General/Internet/WWW/HTMLPrimer.html#}
  274.  
  275.     {#MTX 1.5 User's Manual#http://www.med.ufl.edu/medinfo/mtx/docs/index.html#}
  276.  
  277.     {#Summary of MTX Format#format.txt#}
  278.  
  279.     {#Design Considerations for HTML Documents#design.html#}
  280.  
  281. -----
  282. MTX was developed by {#Richard Rathe, MD#http://www.med.ufl.edu/medinfo/people/rathe.html#}, Director of the {#Office of Medical Informatics#http://www.med.ufl.edu/medinfo/#} for the College of Medicine at the University of Florida. {*The MTX format, documentation, and tools are Copyright 1995-1997 by the Richard Rathe.*} MTX is available without charge for non-commercial use at {#http://www.med.ufl.edu/medinfo/mtx/##}. All copyright and authorship notices must remain in place.
  283.